/**
 * Manage all the  board dependant  functions
 */
#ifndef HARDWAREPROFILE_H
#define	HARDWAREPROFILE_H
#include "GenericTypeDefs.h"


//The PICDEM FS USB Demo Board platform supports the USE_SELF_POWER_SENSE_IO
//and USE_USB_BUS_SENSE_IO features.  Uncomment the below line(s) if
//it is desireable to use one or both of the features.
//#define USE_SELF_POWER_SENSE_IO
#define tris_self_power     TRISAbits.TRISA2    // Input
#if defined(USE_SELF_POWER_SENSE_IO)
#define self_power          PORTAbits.RA2
#else
#define self_power          1
#endif

//#define USE_USB_BUS_SENSE_IO
#define tris_usb_bus_sense  TRISCbits.TRISC7    // Input
#if defined(USE_USB_BUS_SENSE_IO)
#define USB_BUS_SENSE       PORTCbits.RC7
#else
#define USB_BUS_SENSE       1
#endif
/**TODO  Damien untested unverified code end*/





//TODO Damien verify that
#define CLOCK_FREQ 48000000

#define INPUT_PIN	1
#define OUTPUT_PIN	0

/** leds*/
#define LED_0              LATCbits.LATC0
#define LED_1              LATCbits.LATC1



#define programSwitch           PORTCbits.RC2





/**
 * configure your  hardware here
 */
void configureBoard(void);



/**
 * manage led  here
 */
void led(unsigned char ledId, Light light);
void led0(Light light);
void led1(Light light);
void toggleLed0(void);
void toggleLed1(void);
void toggleUSBled(void);

#endif	/* HARDWAREPROFILE_H */

